home *** CD-ROM | disk | FTP | other *** search
-
- /* @(#)extern.h 1.22 91/11/13
- *
- * Contains the external variable definitions used by reve.
- *
- * Copyright (C) 1990, 1991 - Rich Burridge & Yves Gallot.
- * All rights reserved.
- *
- * Permission is granted to copy this source, for redistribution
- * in source form only, provided the news headers in "substantially
- * unaltered format" are retained, the introductory messages are not
- * removed, and no monies are exchanged.
- *
- * Permission is also granted to copy this source, without the
- * news headers, for the purposes of making an executable copy by
- * means of compilation, provided that such copy will not be used
- * for the purposes of competition in any othello tournaments, without
- * prior permission from the authors.
- *
- * No responsibility is taken for any errors on inaccuracies inherent
- * either to the comments or the code of this program, but if reported
- * (see README file), then an attempt will be made to fix them.
- */
-
- extern int bborder ; /* Size of the reve game board border. */
- extern int best_cmove ; /* Best computer move so far. */
- extern int board_height ; /* Height of the reve game board in pixels. */
- extern int board_width ; /* Width of the reve game board in pixels. */
- extern int but_inverted ; /* Value of panel item inverted. */
- extern int cell_height ; /* Height of an individual game board square. */
- extern int cell_width ; /* Width of an individual game board square. */
- extern int cmove_depth ; /* Depth of the current best computer move. */
- extern int color ; /* Current color value. */
- extern int cur_ch ; /* Current character pressed. */
- extern int curx ; /* Current mouse X position. */
- extern int cury ; /* Current mouse Y position. */
- extern int debug ; /* If set, prints out various debug messages. */
- extern int down ; /* Indicates is a mouse button is down. */
- extern int first_move ; /* Set if computer plays first move. */
- extern int help_height ; /* Height of the help window. */
- extern int help_showing ; /* If set, the help window is visible. */
- extern int help_width ; /* Width of the help window. */
- extern int iconic ; /* Start as an icon if set. */
- extern int inv_video ; /* Set if displaying in inverse video. */
- extern int invalid ; /* Set if last move was invalid. */
- extern int isblack ; /* Set if human to play the black pieces. */
- extern int iscolor ; /* Set if this is a color screen. */
- extern int isremote ; /* Set if playing remote user@host. */
- extern int iswhite ; /* Set if human to play the white pieces. */
- extern int itemno ; /* Current panel item being processed. */
- extern int item_value ; /* Value for current panel item. */
- extern int ix ; /* Initial X position of the icon. */
- extern int iy ; /* Initial Y position of the icon. */
- extern int last_move ; /* Last valid computer move. */
- extern int last_outline ; /* Position of last piece whilst dragging. */
- extern int level ; /* Current difficulty level for computer moves. */
- extern int loadgame ; /* Set if there is a game file to load. */
- extern int lsval ; /* Set to 'l' or 's', if loading or saving. */
- extern int max_depth ; /* Computer strategy - maximum depth. */
- extern int monochrome ; /* If set, display will be in monochrome. */
- extern int move ; /* Current move being evaluated. */
- extern int move_delta ; /* Delta for piece animation. */
- extern int nextc ; /* Current event identifier. */
- extern int next_player ; /* Next player (BLACK or WHITE) to move. */
- extern int old_diffval ; /* Old difficulty value (possibly restored). */
- extern int opp_bell ; /* If set, sound bell after opponents move. */
- extern int opp_iconise ; /* If set, close reve window for opponents move. */
- extern int opp_raise ; /* If set, auto raise window after opponent move. */
- extern int pid ; /* Process id of the reve_proc process. */
- extern int piece_x ; /* Current X position of moving piece. */
- extern int piece_y ; /* Current Y position of moving piece */
- extern int pieceXmargin ; /* X margin between piece and cell width. */
- extern int pieceXrad ; /* X radius of board piece. */
- extern int pieceYmargin ; /* Y margin between piece and cell height. */
- extern int pieceYrad ; /* Y radius of board piece. */
- extern int pipe_io[2][2] ;
- extern int play_computer ; /* Set if playing against the computer. */
- extern int posspec ; /* Set if -Wp or -g option is present (for X11) */
- extern int processing ; /* If set, computer is procesing a move. */
- extern int profmax ; /* Current maximum depth. */
- extern int props_showing ; /* If set, the property window is visible. */
- extern int restore_moves ; /* Indicates if legal moves should be reshown. */
- extern int s_flip ;
- extern int s_move ;
- extern int s_opponent ;
- extern int s_player ;
- extern int s_row ;
- extern int s_col ;
- extern int saveres ; /* If set, save computer results to log file. */
- extern int show_moves ; /* If set, all possible moves are being shown. */
- extern int snote ; /* Note value for current suggestion. */
- extern int socketfd ; /* Socket no. for user@host. */
- extern int sstate ; /* State of suggestion (showing/not showing). */
- extern int started ; /* Set just before window is displayed. */
- extern int suggestion ; /* Positive if a suggested move. */
- extern int timevals[] ; /* Total time (in minutes) for each diff. level. */
- extern int tinput ; /* Set, when getting text input for load/save. */
- extern int tx, ty ; /* Position of text field. */
- extern int tw, th ; /* Size of text field. */
- extern int validkey ; /* Set if half way though a valid multiple key. */
- extern int wx ; /* Initial X position of the window. */
- extern int wy ; /* Initial Y position of the window. */
- extern int xdebug ; /* If set, turns on debugging in the X11 driver. */
-
- extern FILE *hfp ; /* File descriptor for online help file. */
-
- extern long help_offsets[] ; /* Offsets into the reve help file. */
-
- extern char *colstr[] ; /* X resource color values. */
- extern int font_heights[] ; /* Height of all fonts used. */
- extern int rcols[] ; /* Red colormap values. */
- extern int gcols[] ; /* Green colormap values. */
- extern int bcols[] ; /* Blue colormap values. */
-
- extern time_t last_btime ; /* Last black time value. */
- extern time_t last_wtime ; /* Last white time value. */
- extern time_t start_time ; /* Start time for current move. */
- extern time_t timeleft ; /* Amount of time left for computer moves. */
- extern long edges[] ; /* Edges Stability Table */
- extern long note ; /* Note value for current computer move. */
-
- extern char *bfontname ; /* Bold font name. */
- extern char *hfontname ; /* Help font name. */
- extern char *nfontname ; /* Normal font name. */
-
- extern char *bstone_name ; /* "Black" stone name for messages. */
- extern char *diff_values[] ; /* Values for cyclic difficulty button. */
- extern char *display ; /* X11 display information. */
- extern char *comp_values[] ; /* Values for computer plays button. */
- extern char edgefile[] ; /* Location of the reve edge table file. */
- extern char *fontnames[] ; /* Font names (via X resources). */
- extern char gamefile[] ; /* Name of file for load/save. */
- extern char geometry[] ; /* X11 geometry information. */
- extern char helpfile[] ; /* Location of the reve online help file. */
- extern char line[] ;
- extern char *notes_values[] ; /* Values for cyclic notes button. */
- extern char *opponent ; /* user@host for remote networked person. */
- extern char *player_values[] ; /* Values for cyclic black/white item. */
- extern char *printcommand ; /* Command for printing the game. */
- extern char progname[] ; /* The name of this program. */
- extern char *resources[] ; /* Reve X resources read. */
- extern char reveproc[] ; /* Pathname of the reve_proc program. */
- extern char *wstone_name ; /* "White" stone name for messages. */
-
- extern FILE *rem_fp ;
- extern struct timeval tp ; /* Used by the nap_upto routine. */
-
- extern struct iteminfo items[] ; /* Information records for button items. */
-
- extern BOARD board ; /* The current reve board. */
- extern BOARD old_board ; /* The previous reve board. */
- extern BOARD *s_pos ;
- extern BOARD s_all ; /* List of valid positions for this move. */
- extern BOARD moves[64] ; /* Complete array of board moves. */
-
- extern enum cantype cmode, last_cmode ;
- extern enum disp_type dtype ;
- extern enum gr_type gtype ; /* Graphics type. */
- extern enum set_type direction ; /* Incremental direction for cycle item. */
- extern enum win_type curwin ; /* Window the current event for in. */
-